<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<script src="../../plugins/vue/vue.js"></script>
<script src="../../plugins/axios/axios.min.js"></script>
<link rel="stylesheet" href="../../plugins/element-ui/index.css">
<script src="../../plugins/element-ui/index.js"></script>

<body>
<div id="left">
  <el-col :span="24" >
    <el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose">
      <el-menu-item index="1" @click="jump('middle')">
        <i class="el-icon-user-solid"></i>
        <span>我的信息</span>
      </el-menu-item>
      <el-menu-item index="2" @click="jump('publish_goods')">
        <i class="el-icon-menu"></i>
        <span slot="title">发布商品</span>
      </el-menu-item>
      <el-menu-item index="3" @click="jump('participate')">
        <i class="el-icon-shopping-bag-2" ></i>
        <span slot="title">参拍宝贝</span>
      </el-menu-item>
      <el-menu-item index="4"  @click="jump('bought_goods')">
        <i class="el-icon-document"></i>
        <span slot="title">已拍下</span>
      </el-menu-item>
      <el-menu-item index="5" @click="jump('sell')">
        <i class="el-icon-circle-check"></i>
        <span slot="title">我卖出的</span>
      </el-menu-item>
      <el-menu-item index="6" @click="jump('comment')">
        <i class="el-icon-s-comment"></i>
        <span slot="title">评论管理</span>
      </el-menu-item>
    </el-menu>
  </el-col>
</div>

</body>
<script>
  new Vue({
    el: "#left",
    data: {},
    methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      },
      jump(page) {
        console.log("跳转到" + page);
        window.parent.middle.location.href = "./" + page + ".html";
      },

    }
  })
</script>

</html>